-- GENERATED SPELL FOR [Crust Burster] --


function spell0_16844(pUnit, Event) --@Bore,n/a--
pUnit:FullCastSpellOnTarget(32738,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16844', 20000, 1)
end

function spell1_16844(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(31747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16844', 2000, 1)
end

function Sorts_16844(pUnit, Event)
local choix_sorts_16844 = math.random(0, 1)
if choix_sorts_16844 == 0 then
pUnit:RegisterEvent('spell0_16844', 1, 1)
end
if choix_sorts_16844 == 1 then
pUnit:RegisterEvent('spell1_16844', 1, 1)
end
end

function mob16844_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16844', math.random(1500, 3000), 1)
end

function mob16844_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16844_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16844_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16844, 1, 'mob16844_Action')
RegisterUnitEvent(16844, 2, 'mob16844_Leave')
RegisterUnitEvent(16844, 3, 'mob16844_Kill')
RegisterUnitEvent(16844, 4, 'mob16844_Die')
